/*   
 * Copyright (c) 2010-2020 DMGIS Ltd. All Rights Reserved.   
 *   
 * This software is the confidential and proprietary information of   
 * DMGIS. You shall not disclose such Confidential Information   
 * and shall use it only in accordance with the terms of the agreements   
 * you entered into with DMGIS.   
 *   
 */
package com.dmgis.qxfw.common;

import java.io.InputStream;
import java.util.Properties;

import com.dmgis.qxfw.common.DbConfig;
import org.springframework.beans.factory.annotation.Value;

/**
 * 
 * @author lc
 * @ClassName: DbConfig
 * @date 2018年9月10日 下午1:58:52 
 * @Description:全局配置
 */
public class DbConfig {
//	static {
//		Properties prop = new Properties();
//		// 通过Object.class获取资源路径 path
//		// 不以’/'开头时默认是从此类所在的包下取资源，以’/'开头则是从ClassPath根下获取。其只是通过path构造一个绝对路径，最终还是由ClassLoader获取资源。
//		// InputStream in = Object.class.getResourceAsStream("/cas.properties");
//		InputStream in = DbConfig.class.getClassLoader().getResourceAsStream("config.properties");
//		try {
//			prop.load(in);
//			// 获取value
//			MONGDB_NAME = prop.getProperty("MONGDB_NAME");
//			HOST = prop.getProperty("HOST");
//			pg_userName = prop.getProperty("pg_userName");
//			pg_pwd = prop.getProperty("pg_pwd");
//			PORT = Integer.parseInt(prop.getProperty("PORT"));
//			pg_url = prop.getProperty("pg_url");
//			DBNAME = prop.getProperty("DBNAME");
//			messageurl = prop.getProperty("messageurl");
//			callbaseurl = prop.getProperty("callbaseurl");
//			fileurl = prop.getProperty("FILEURL");
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//	}
	//mongodb配置

	public  static String MONGDB_NAME = "hndz_qxfile";

	public  static String HOST = "192.168.0.120";

	public  static int PORT = 27017;
	
	
	//postgresql全局配置
	//数据库连接用户密码

	public static  String pg_userName = "postgres";

	public static  String pg_pwd = "123456";

	public static  String pg_url = "jdbc:postgresql://192.168.0.120:5432/hndz_qxdata";
	
	//dbname 配置数据库名称前缀，选择地区数据库。

	public static  String DBNAME = "hndz_qxdata";
	public static  String messageurl;
	public static  String callbaseurl;
	public static  String fileurl = "D:\\temp\\Product\\";

}